#!/bin/bash
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================

set -e
cd $(cd `dirname $0`; pwd)/..
export SLOG_PRINT_TO_STDOUT=0

train_code_path=/home/wan/Projects/naic2020/naic2020_seg_mindspore
eval_path=/home/wan/Projects/naic2020/naic2020_seg_mindspore/cache

if [ -d ${eval_path} ]; then
rm -rf ${eval_path}
fi
mkdir -p ${eval_path}

python ${train_code_path}/eval.py \ \
    --data_root=/home/wan/data/seg_naic/final_test  \
    --data_lst=/home/wan/data/seg_naic/final_test/test_list.txt  \
    --ckpt_path /home/wan/Projects/naic2020/naic2020_seg_mindspore/checkpoints/model.ckpt \
    --device GPU \
    --batch_size=10  \
    --num_classes=17  \
    --scales=1.0  \
    2>&1 | tee ${eval_path}/eval_log
